//======================================================================================
//  Apache License, Version 2.0
//  Notes:Use this command to anonymously check out the latest project source code:
//  Non-members may check out a read-only working copy anonymously over HTTP.
//  SVN checkout http://YHHLineCommandWsp.googlecode.com/svn/trunk/ 
//
//  Author:		Kevin Yang
//  Email:		Bigearrabbit@qq.com
//
//  DATE:		2013-4-7
//
//  File Name:	YHHLineCommandCore.h
//
//  Notes:
//
//======================================================================================
#ifndef YHHLineCommandCore_H
#define YHHLineCommandCore_H

//Local Framework
#include "YHHLineCommandItf.h"
#include "YHHLineCommandChildParam.h"

// System  Framework
#include "CATBaseUnknown.h" 
//YHHCatiaBaseUtlFrm
#include "YHHPropertyDefine.h"

//pre-declare class
class YHHILineCommandChild;
class CATIGSMTool;
class CATIPrtPart;
class CATFrmEditor;


/// <summary>Core of Line create </summary>
/// <remarks></remarks>
/// <author>Kevin Yang</author>
/// <date>2013-4-7</date>
class ExportedByYHHLineCommandItf YHHLineCommandCore: public CATBaseUnknown
{
  CATDeclareClass;

  public:

  // Standard constructors and destructors
  // -------------------------------------
     YHHLineCommandCore ();
     virtual ~YHHLineCommandCore ();
public://Property

	/// <summary>MyFeature define</summary>
	/// <remarks></remarks>
	/// <author>Kevin Yang</author>
	/// <date>2013-4-7</date>
	YHHPropertyDefineGetGetSet(CurrentElt,CATISpecObject_var);

	/// <summary>MyFeature define</summary>
	/// <remarks></remarks>
	/// <author>Kevin Yang</author>
	/// <date>2013-4-7</date>
	YHHPropertyDefineGetGet(MyFeature,CATISpecObject_var);

	/// <summary>param pointer define</summary>
	/// <remarks></remarks>
	/// <author>Kevin Yang</author>
	/// <date>2013-4-7</date>
	YHHPropertyDefinePointerGetGetSet(ParamChild,YHHLineCommandChildParam);

	/// <summary>Editor pointer define</summary>
	/// <remarks></remarks>
	/// <author>Kevin Yang</author>
	/// <date>2013-4-7</date>
	YHHPropertyDefinePointerGetGetSet(Editor,CATFrmEditor);

public:
	/// <summary>Create the line</summary>
	/// <remarks></remarks>
	/// <author>Kevin Yang</author>
	/// <date>2013-4-7</date>
	HRESULT Create() ;

	HRESULT CreateTool(CATIPrtPart * pIPrtPart, CATIGSMTool ** pIGsmtool);

	/// <summary>Extract Param</summary>
	/// <param name="ipInstance">Instance</param>
	/// <param name="oParam">out param</param>
	/// <return>HRESULT</return>
	/// <remarks></remarks>
	/// <author>Kevin Yang</author>
	/// <date>2013-4-10</date>
	HRESULT ExtractParams(YHHILineCommandChild *ipInstance,YHHLineCommandChildParam & oParam);

	HRESULT LookingForAnyTypeOfBody(CATIGSMTool ** piGsmtool) ;
	HRESULT LookingForGeomSetOrOrderedGeomSet(CATIGSMTool ** piGsmtool) ;
	HRESULT LookingForGeomSet(CATIGSMTool ** piGsmtool) ;
private:
  // Copy constructor and equal operator prevent to copy
  // -----------------------------------
  YHHLineCommandCore (YHHLineCommandCore &);
  YHHLineCommandCore& operator=(YHHLineCommandCore&);
 public:
};

//-----------------------------------------------------------------------

#endif
